package com.fifth.common.pojo.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * <p>
 * 购物车
 * </p>
 *
 * @author 第五组
 * @since 2022-09-01
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("o_cart")
@ApiModel(value = "Cart对象", description = "购物车")
public class Cart implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "购物车主键")
    private String id;

    @ApiModelProperty(value = "用户id")
    private String uid;

    @ApiModelProperty(value = "商品id",required = true)
    private String goodsId;

    @ApiModelProperty(value = "商品数量",required = true)
    private Integer num;

    @ApiModelProperty(value = "商品价格",required = true)
    private BigDecimal price;


    @ApiModelProperty("收货地址id")
    private String addrid;

    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private String img;

    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private String gname;

    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private String sname;

    @ApiModelProperty("逻辑删除")
    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    private Integer isDeleted;

    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private String bid;

    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private Integer residue;



}
